<?php
	require("libraries/student.php");
  	class Trainmap extends Student{
		public function __construct(){
			parent::__construct();
			$this->load->helper("form");
			$this->load->library("form_validation");
			$this->load->model("model_index");
		}
		public function index(){
			$data['title']= "Train map";
			$data['template'] = "trainmap/intro";
			$data['act'] = 8;
			$data['data']['intro']= $this->model_index->trainmap();
			if($this->input->post("ok") != ""){
				$value = array(
						"description" => $this->input->post("description")
					);
				$this->model_index->update_map($value,$id);
				redirect(base_url()."admin/index");
			}else{
				$this->load->view("layout",$data);
			}
		}
	}